package org.wendu.wdoa.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.wendu.wdoa.common.page.Page;
import org.wendu.wdoa.dto.TaskBeanDto;
import org.wendu.wdoa.dto.TaskDto;
import org.wendu.wdoa.model.Task;

import java.util.List;

public interface TaskDao {

    void addNewTask01(TaskDto taskDto);

    @Update("update t_task set task_status=1 where task_id=#{task_id}")
    void holdNewTask01(String task_id);

    @Select("select * from t_task where leader_id=#{leader_id} and task_status = 1 order by task_date desc")
    List<Task> selectAllTesk01(String leader_id);

    @Select("select * from t_task where task_status = 0 and leader_id=#{leader_id} order by task_date desc")
    List<Task> selectNoTask01(String leader_id);

    @Update("update t_task set task_title=#{task_title},task_details=#{task_details} where task_id=#{task_id}")
    void modifyTask01(TaskDto taskDto);

    @Delete("delete from t_task where task_id=#{task_id}")
    void deleteTaskOne01(String task_id);

    void issueTask01(TaskBeanDto taskBeanDto);
}
